<?php
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/js/jquery.validity/jquery.validate.js",CClientScript::POS_END);
?>
  <div class="modal-header">
  
    <h3>产品分类-编辑</h3>
  </div>
  <div class="modal-body" style='max-height:600px;'>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'school-form',
	'enableAjaxValidation'=>false,
)); ?>

	<div>
	 <div class="control-group">
        <label class="control-label" for=""><b>分类名称</b></label>
        <div class="controls">
          <div class="input-append">
			<?php echo $form->textField($model,'c_name',array('name'=>"c_name",'class'=>'width270')); ?>	
          </div>
		  <span for="s_name" class="error" style=""><?=isset($model->errors['c_name'])?join('',$model->errors['c_name']):""?></span>
          <span class="help-inline" id=""></span>
        </div>  
      </div>
	  </div>
	</div>
  <div class="form-actions">
	<button type="submit" class="btn btn-primary"  name="addsubmit" value="add">确认修改</button>&nbsp;
	<a href="<?=isset($_COOKIE['categoryreturnurl'])?$_COOKIE['categoryreturnurl']:""?>" class="btn" closeTime">返回</a>
	</div>

<?php $this->endWidget(); ?>
<script>
$(function(){
			$("#school-form").validate({
				// debug: true,
				autoCreateRanges:true	,
				errorClass: "error",
				errorElement: "span",
				rules: {
					c_name: 'required',
				},
				messages: {
					c_name: '请输分类名称',
				}
			});
		
		})
</script>